{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 1,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "VGG"
      ]
     },
     "execution_count": 1,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "using Knet\n",
    "include(\"vgg.jl\")"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/markdown": [
       "julia vgg.jl image-file-or-url\n",
       "\n",
       "This example implements the VGG model from `Very Deep Convolutional Networks for Large-Scale Image Recognition', Karen Simonyan and Andrew Zisserman, arXiv technical report 1409.1556, 2014. This example works for D and E models currently. VGG-D is the default model if you do not specify any model.\n",
       "\n",
       "  * Paper url: https://arxiv.org/abs/1409.1556\n",
       "  * Project page: http://www.robots.ox.ac.uk/~vgg/research/very_deep\n",
       "  * MatConvNet weights used here: http://www.vlfeat.org/matconvnet/pretrained\n"
      ],
      "text/plain": [
       "julia vgg.jl image-file-or-url\n",
       "\n",
       "This example implements the VGG model from `Very Deep Convolutional Networks for Large-Scale Image Recognition', Karen Simonyan and Andrew Zisserman, arXiv technical report 1409.1556, 2014. This example works for D and E models currently. VGG-D is the default model if you do not specify any model.\n",
       "\n",
       "  * Paper url: https://arxiv.org/abs/1409.1556\n",
       "  * Project page: http://www.robots.ox.ac.uk/~vgg/research/very_deep\n",
       "  * MatConvNet weights used here: http://www.vlfeat.org/matconvnet/pretrained\n"
      ]
     },
     "execution_count": 2,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "@doc VGG"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 3,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "usage: <PROGRAM> [--model MODEL] [--top TOP] [--atype ATYPE] [image]\n",
      "\n",
      "vgg.jl (c) Deniz Yuret, İlker Kesen, 2016. Classifying images with the\n",
      "VGG model from http://www.robots.ox.ac.uk/~vgg/research/very_deep.\n",
      "\n",
      "positional arguments:\n",
      "  image          Image file or URL. (default:\n",
      "                 \"https://github.com/BVLC/caffe/raw/master/examples/images/cat.jpg\")\n",
      "\n",
      "optional arguments:\n",
      "  --model MODEL  Model name (default: \"imagenet-vgg-verydeep-16\")\n",
      "  --top TOP      Display the top N classes (type: Int64, default: 5)\n",
      "  --atype ATYPE  array and float type to use (default:\n",
      "                 \"KnetArray{Float32}\")\n",
      "\n"
     ]
    }
   ],
   "source": [
    "VGG.main(\"--help\")"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 7,
   "metadata": {},
   "outputs": [
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current\n",
      "                                 Dload  Upload   Total   Spent    Left  Speed\n",
      "100  1781  100  1781    0     0    454      0  0:00:03  0:00:03 --:--:--   454\n"
     ]
    },
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAHwAAACgCAIAAABBgJ+9AAAABGdBTUEAALGPC/xhBQAAAAFzUkdCAK7OHOkAAAAgY0hSTQAAeiYAAICEAAD6AAAAgOgAAHUwAADqYAAAOpgAABdwnLpRPAAAAAZiS0dEAP8A/wD/oL2nkwAAAAlwSFlzAAALEgAACxIB0t1+/AAALVpJREFUeNrtncmzbNl11n+nz/a2772qkqpUql6ybKMGjA1hYRzGmMCYgYMgGBEwYAB/jScO/goHjgCDgwjCMrINyHJfsqzqq96r5jW3zeb0h8G319n73rIJNFEOKvcg4758J0+ezFx7nbW+9a1vRU3TAFEUAcTR+PdABPQADAC0DMAwDEAXAfRDDzRtC/RRDCRJMh7f9z3QDzEQxzE3l95Fb9sB0HXdrWOGiL/2VUQxoP9shwbIowwY6IG2a4EsyYCUCGiD56dJDmzaCsjiBMjiFOj6brzOmAgo2xoYhh7IswnQ9Q2QxRnQte14zcuiAFZlCSRZMX5Lun6d074TgNvfxX79CFYkSw9tvHf/FWO/VccA9MPAaL+y+lh2FwHDEAHt0I/nSaJkPFvb9eNrQ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l8CVeF4aIBIGfKswLiSea7qvuar+4mjy1nOOBnhBtsyyI2dGuleG2BH60boEiLXUcBj0W/jlNkCpPj/x9I1m3S+KIDJdMnYodH1wMnBAjh/lAJnjx8BkyQCposppuSv+H25PMCQ9Cjx3W9Shj49Osbqrt/7/g+Ah/c/AKqmBp5++mng5S8+O16hJku6yXaxj82lNmO5aIepxluHRsuo5RJg/YpkZOnaW33kKRKZm6cqrv2+j3RHyzXiOLi6Dyw0sHqLTyKsd8LxW4LNcLNqGrIEhCnHGIdWMYlmI37j6z8JfOW1lzEN3tXVOaZ9J4aim37nsKAIU4vU+V957nPj/yZ9DfTlCnj8ySfAdDEHPnf3y8DpgVdo6eo5o6XrXZSLdp61IgUmZdHilzVNDDSZMB8/VaxeXwKbyyfAYrEE18ftqkjCaAOWzt7Sd7DSUJtHXRaGlfu/w0dpWrlODA/D3IrxYcxs48FORlp32KSW1aYEZpMC2GQJcHwwBdLP3QGGTnMEWgzHcJ1Bbpqkv4auqbAI/WgxBb700heA0+MlFsO8/MXngs+o3r4Ym2RD1ABFkmOYuxJhRRqH0xyrjko73s3JCzpa5ccd6zFObx2Tpv4O1O/7SHe10hA+kW262aQEj+EO6GDEZJTXOdfujwmr411bYaxHMXuzSc44KVSTpmc5YzfFRoyUCXb/wLHd/aT0ofcad1Ifa6oamM4XwLPP3AOuVmuMsaXqq7RZXM9nkTL2BDXSd8yCaw6ntWuXx0CbCNnX/cxXZTmWjry6D33PuIuC8Mpoe22Ana1bePqnOucUpeCdd936Cbg3QZfbCEzIANFc0zjOsHhGmnJi20YdQLldMWLlse91w2kG6BFuWnoSzANWzKMpk7Joi3MiILtzMr5K7NlGEw2qeLwe7fW2FmvMTzlzHMRgLoc6pMLvzWm/VH4qk47R82IhrPbRy67W/wUNQTX/GccmwAAAAABJRU5ErkJggg==",
      "text/plain": [
       "80×62 Array{RGB{N0f8},2}:\n",
       " RGB{N0f8}(0.984,0.984,0.984)  RGB{N0f8}(0.988,0.988,0.988)  …  RGB{N0f8}(0.906,0.988,1.0)  \n",
       " RGB{N0f8}(0.984,0.984,0.984)  RGB{N0f8}(0.984,0.992,0.988)     RGB{N0f8}(0.906,0.98,0.996) \n",
       " RGB{N0f8}(0.984,0.992,0.988)  RGB{N0f8}(0.976,0.992,0.988)     RGB{N0f8}(0.91,0.98,0.988)  \n",
       " RGB{N0f8}(0.98,0.996,0.992)   RGB{N0f8}(0.976,1.0,0.992)       RGB{N0f8}(0.925,0.98,0.992) \n",
       " RGB{N0f8}(0.976,1.0,1.0)      RGB{N0f8}(0.969,1.0,1.0)         RGB{N0f8}(0.937,0.976,0.984)\n",
       " RGB{N0f8}(0.965,1.0,0.996)    RGB{N0f8}(0.961,1.0,0.996)    …  RGB{N0f8}(0.941,0.973,0.984)\n",
       " RGB{N0f8}(0.953,0.992,0.988)  RGB{N0f8}(0.949,0.996,0.988)     RGB{N0f8}(0.949,0.98,0.988) \n",
       " RGB{N0f8}(0.941,0.988,0.98)   RGB{N0f8}(0.941,0.988,0.98)      RGB{N0f8}(0.957,0.996,1.0)  \n",
       " RGB{N0f8}(0.933,0.992,0.98)   RGB{N0f8}(0.937,0.996,0.984)     RGB{N0f8}(0.929,0.984,0.984)\n",
       " RGB{N0f8}(0.933,0.992,0.98)   RGB{N0f8}(0.937,0.996,0.984)     RGB{N0f8}(0.914,0.988,0.98) \n",
       " RGB{N0f8}(0.933,0.992,0.98)   RGB{N0f8}(0.937,0.996,0.984)  …  RGB{N0f8}(0.906,0.984,0.976)\n",
       " RGB{N0f8}(0.933,0.992,0.98)   RGB{N0f8}(0.937,0.996,0.984)     RGB{N0f8}(0.898,0.984,0.973)\n",
       " RGB{N0f8}(0.933,0.988,0.988)  RGB{N0f8}(0.937,0.992,0.992)     RGB{N0f8}(0.898,0.984,0.976)\n",
       " ⋮                                                           ⋱                              \n",
       " RGB{N0f8}(0.722,0.659,0.596)  RGB{N0f8}(0.729,0.667,0.604)     RGB{N0f8}(0.208,0.22,0.184) \n",
       " RGB{N0f8}(0.686,0.624,0.561)  RGB{N0f8}(0.69,0.627,0.565)      RGB{N0f8}(0.227,0.239,0.196)\n",
       " RGB{N0f8}(0.667,0.6,0.529)    RGB{N0f8}(0.675,0.608,0.537)  …  RGB{N0f8}(0.294,0.302,0.251)\n",
       " RGB{N0f8}(0.651,0.584,0.514)  RGB{N0f8}(0.659,0.592,0.522)     RGB{N0f8}(0.318,0.31,0.251) \n",
       " RGB{N0f8}(0.675,0.608,0.529)  RGB{N0f8}(0.675,0.608,0.529)     RGB{N0f8}(0.333,0.31,0.247) \n",
       " RGB{N0f8}(0.702,0.635,0.557)  RGB{N0f8}(0.702,0.635,0.557)     RGB{N0f8}(0.396,0.365,0.29) \n",
       " RGB{N0f8}(0.722,0.655,0.576)  RGB{N0f8}(0.718,0.651,0.573)     RGB{N0f8}(0.471,0.42,0.345) \n",
       " RGB{N0f8}(0.722,0.655,0.576)  RGB{N0f8}(0.718,0.651,0.573)  …  RGB{N0f8}(0.494,0.431,0.341)\n",
       " RGB{N0f8}(0.729,0.667,0.576)  RGB{N0f8}(0.729,0.667,0.576)     RGB{N0f8}(0.498,0.412,0.322)\n",
       " RGB{N0f8}(0.745,0.682,0.592)  RGB{N0f8}(0.745,0.682,0.592)     RGB{N0f8}(0.525,0.424,0.333)\n",
       " RGB{N0f8}(0.749,0.678,0.592)  RGB{N0f8}(0.749,0.678,0.592)     RGB{N0f8}(0.565,0.455,0.361)\n",
       " RGB{N0f8}(0.733,0.663,0.576)  RGB{N0f8}(0.741,0.671,0.584)     RGB{N0f8}(0.588,0.471,0.376)"
      ]
     },
     "execution_count": 7,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "using FileIO\n",
    "img = download(\"http://home.mweb.co.za/pa/pak04857/uniweb/animalimages/elephantthumb.jpg\")\n",
    "load(img)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 8,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "vgg.jl (c) Deniz Yuret, İlker Kesen, 2016. Classifying images with the VGG model from http://www.robots.ox.ac.uk/~vgg/research/very_deep.\n",
      "opts=(:atype, \"KnetArray{Float32}\")(:top, 5)(:image, \"/tmp/juliatPvTPC\")(:model, \"imagenet-vgg-verydeep-16\")\n"
     ]
    },
    {
     "data": {
      "text/plain": [
       "5×2 Array{Any,2}:\n",
       " 0.625103    \"tusker\"                              \n",
       " 0.250494    \"Indian elephant, Elephas maximus\"    \n",
       " 0.111835    \"African elephant, Loxodonta africana\"\n",
       " 0.00527722  \"Great Dane\"                          \n",
       " 0.00294648  \"Mexican hairless\"                    "
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "  0.037909 seconds (1.80 k allocations: 87.094 KiB)\n",
      "\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "\u001b[1m\u001b[36mINFO: \u001b[39m\u001b[22m\u001b[36mClassifying\n",
      "\u001b[39m"
     ]
    }
   ],
   "source": [
    "VGG.main(img)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Julia 1.0.0",
   "language": "julia",
   "name": "julia-1.0"
  },
  "language_info": {
   "file_extension": ".jl",
   "mimetype": "application/julia",
   "name": "julia",
   "version": "1.0.0"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 2
}
